<?php
function zha_get_room_list(){
    $data = _file_cache_get_cache('room_list');
    if ($data['rst']<0){
        return _zha_update_room_list();
    } else {
        return $data['data'];
    }
}

function _zha_update_room_list(){
    $sql = "SELECT * FROM s_room";
    $rst = mysql_x_query($sql);
    $room_list = array();
    while ($row = mysql_fetch_assoc($rst)){
        $room_list[$row['room_id']] = $row;
    }
    _file_cache_gen_cache('room_list',$room_list);
    return $room_list;
}

function zha_enter_room($room_id){
    
}

?>